/**
 * 角色信息编辑controller.
 * @author 苏亚欣
 * @version 1.0.0, 2015-07-14
 */
Ext.define('MyApp.view.CarEditView', {
    extend : 'Ext.window.Window',
    alias : 'widget.careditview',
    id : 'careditview',
    title : '车队信息编辑',
    resizable : false,
    closeAction : 'hide',
    constrainHeader:true,
    width : 360,
    height : 275,
    //layout : 'fit',
    modal : true,
    layout: {
        align: 'middle',
        pack: 'center',
        type: 'hbox'
    },
    initComponent : function() {
        this.items = [{
            xtype : 'form',
            border : false,
            padding: 10,
            items : [{
                xtype : 'panel',
                layout:'column',
                border: false,
                defaults : {
                    labelAlign : 'right',
                    labelWidth : 70,
                    margin: '5'
                },
                items: [{
                    xtype: 'textfield',
                    width: 300,
                    name: 'car_name',
                    allowBlank : false,
                    fieldLabel:'车队名称',
                    length: 20
                    //vtypeText : '角色名称最多可输入20个字符',
                    //vtype: 'limitLen'
                }]
            },{
                xtype:'panel',
                layout:'column',
                border: false,
                defaults : {
                    labelAlign : 'right',
                    labelWidth : 70,
                    margin: '5'
                },
                items:{
                    xtype:'textarea',
                    fieldLabel:'介绍',
                    name:'car_about',
                    width: 300,
                    height: 80,
                    length: 200,
                    //vtypeText : '备注信息最多可输入200个字符',
                    //vtype: 'limitLen'
                }
            }]
        }],

            this.fbar = [{
                xtype: 'button',
                margin: '6',
                text: '保存',
                name: 'btn-save',
                iconCls: 'btn-save'
            },{
                xtype: 'button',
                margin: '6',
                text: '取消',
                name: 'btn-cancel',
                iconCls: 'btn-cancel',
                scope: this,
                handler: this.close
            }];

        this.callParent(arguments);
    }
});